Skip to content

Conversation

@AmirSa12
Copy link
Member

now, pkg managers completions are done through a wrapper.

@changeset-bot
Copy link

changeset-bot bot commented Aug 10, 2025

⚠️ No Changeset found

Latest commit: f9280b8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 10, 2025

Open in StackBlitz

npm i https://pkg.pr.new/bombshell-dev/tab/@bombsh/tab@31

commit: f9280b8

@AmirSa12 AmirSa12 merged commit cec5d29 into main Aug 11, 2025
9 checks passed
@AmirSa12 AmirSa12 deleted the fix/pkg-manager-completions branch August 11, 2025 05:00
completion.addCommand('test', 'Run tests', [], noopCompletion);
completion.addCommand('build', 'Build project', [], noopCompletion);
export function setupPnpmCompletions(completion: PackageManagerCompletion) {
completion.command('add', 'Install a package');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i do not see any completion for all of these commands, we should provide for all of them before release. that's what we agreed on as far as i remember.

{ value: 'tests/**/*.ts', description: 'Test files' },
];
};
if (command.value === 'lint') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the whole commander api needs a new look.

}
}

async function getCliCompletions(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function and checkCliHasCompletions has so much redundancy and i feel they're heavily similar.

* This extends RootCommand and adds package manager-specific logic.
* It acts as a layer on top of the core tab library.
*/
export class PackageManagerCompletion extends RootCommand {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i do not think we need this class, it can be done through some imperative functions and calls.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove it and revisit the implementation. it's a bit hard to understand this implementation for me.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and we need tests for the package manager completions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants